#include "myPoint.h"

myPoint::myPoint()
    : m_x(0)
    , m_y(0)
    , m_g(0)
{

}

myPoint::myPoint(int x, int y, int g)
    : m_x(x)
    , m_y(y)
    , m_g(g)
{
}

myPoint::myPoint(const myPoint &a)
{
    this->m_x = a.m_x;
    this->m_y = a.m_y;
    this->m_g = a.m_g;
}

myPoint::~myPoint()
{

}

int myPoint::x() const
{
    return m_x;
}

void myPoint::setX(int ax)
{
    m_x = ax;
}

int myPoint::y() const
{
    return m_y;
}

void myPoint::setY(int ay)
{
    m_y = ay;
}

int myPoint::group() const
{
    return m_g;
}

void myPoint::setGroup(int g)
{
    m_g = g;
}

bool myPoint::operator ==(const myPoint& b) const
{
    if ((m_x == b.m_x)
            && (m_y == b.m_y)
            && (m_g == b.m_g)) {
        return true;
    }

    return false;
}

bool myPoint::operator !=(const myPoint& b) const
{
    return !(this->operator ==(b));
}
